package com.fuxian.service.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Repository;
import com.fuxian.dao.StudentDao;
import com.fuxian.model.Student;
import com.fuxian.service.StudentService;
@Repository
public class StudentServiceImpl implements StudentService {
	@Resource
	private StudentDao studentdao;
	public void addStudent(Student student) {
		studentdao.addStudent(student);

	}

	public void deleteStudentById(int id) {
		studentdao.deleteStudentById(id);

	}

	public void modifyStudent(Student student) {
		studentdao.modifyStudent(student);

	}

	public List<Student> selectAllStudent(int start,int size) {
		List<Student>list=studentdao.selectAllStudent(start,size);
		return list;
	}

	public Student selectStudentById(int id) {
		Student student=studentdao.selectStudentById(id);
		return student;
	}

	public int selectCount() {
		return studentdao.selectStudentCount();
	}

}
